package com.totoro.tymapping.executor.command.impl;

import com.totoro.tymapping.TyMapping;
import com.totoro.tymapping.constants.StaticSystemVarConst;
import com.totoro.tymapping.executor.command.MainCommandExecutor;
import com.totoro.tymapping.utils.ColorUtil;
import org.bukkit.command.CommandSender;

/**
 * @author Totoro
 * @version 0.1.0
 * @date 2025/8/13 - 17:37
 * @description 关闭命令执行器
 **/
public class StopExecutor implements MainCommandExecutor {
    @Override
    public void execute(TyMapping plugin, CommandSender sender, String[] args) {
        if(! sender.isOp()) {
            sender.sendMessage(plugin.getLanguageManager().getLanguageData().getMsg().getNoPermission());
            return;
        }
        plugin.getCheckTaskManager().stop();
    }
}
